Warnings cleanup.
-Werror added when no_warns=y
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
CFLAGS += -DCONFIG_XEN_IA64_DOM0_VP
endif
ifeq ($(no_warns),y)
-CFLAGS += -Wa,--fatal-warnings
+CFLAGS += -Wa,--fatal-warnings -Werror -Wno-uninitialized
endif
LDFLAGS := -g
}
#endif
+#ifndef XEN
static int __init iosapic_enable_kmalloc (void)
{
iosapic_kmalloc_ok = 1;
return 0;
}
core_initcall (iosapic_enable_kmalloc);
+#endif
#ifdef XEN
/* nop for now */
return;
}
+#ifdef XEN /* warning cleanup */
+ if (strncmp((char *)systab->signature, "SST_", 4) != 0)
+#else
if (strncmp(systab->signature, "SST_", 4) != 0)
+#endif
+
printk(KERN_ERR "bad signature in system table!");
check_versions(systab);
mb(); /* Order data access and bit testing. */
}
put_cpu();
+#ifndef XEN
return IRQ_HANDLED;
+#endif
}
/*
* negative that it is behind.
*/
static inline long
+#ifdef XEN /* warning cleanup */
+get_delta (unsigned long *rt, unsigned long *master)
+#else
get_delta (long *rt, long *master)
+#endif
{
unsigned long best_t0 = 0, best_t1 = ~0UL, best_tm = 0;
unsigned long tcenter, t0, t1, tm;
{
unsigned long platform_base_freq, itc_freq;
struct pal_freq_ratio itc_ratio, proc_ratio;
+#ifdef XEN /* warning cleanup */
+ unsigned long status, platform_base_drift, itc_drift;
+#else
long status, platform_base_drift, itc_drift;
+#endif
/*
* According to SAL v2.6, we need to use a SAL call to determine the platform base
itc_freq = (platform_base_freq*itc_ratio.num)/itc_ratio.den;
local_cpu_data->itm_delta = (itc_freq + HZ/2) / HZ;
+#ifdef XEN /* warning cleanup */
+ printk(KERN_DEBUG "CPU %d: base freq=%lu.%03luMHz, ITC ratio=%u/%u, "
+#else
printk(KERN_DEBUG "CPU %d: base freq=%lu.%03luMHz, ITC ratio=%lu/%lu, "
+#endif
"ITC freq=%lu.%03luMHz", smp_processor_id(),
platform_base_freq / 1000000, (platform_base_freq / 1000) % 1000,
itc_ratio.num, itc_ratio.den, itc_freq / 1000000, (itc_freq / 1000) % 1000);
static struct ia64_pal_retval
pal_fixed_addr(VCPU *vcpu){
+ struct ia64_pal_retval result;
+
+ result.status= -1; //unimplemented
+ return result;
}
static struct ia64_pal_retval
mtlb.page_flags = tlb->page_flags & ~PAGE_FLAGS_RV_MASK;
mtlb.ppn = get_mfn(d->domain,tlb->ppn);
mtlb_ppn=mtlb.ppn;
+
+#if 0
if (mtlb_ppn == INVALID_MFN)
panic_domain(vcpu_regs(d),"Machine tlb insert with invalid mfn number.\n");
+#endif
psr = ia64_clear_ic();
if ( cl == ISIDE_TLB ) {
st8 [r17] = r27
;;
itc.i r25
+ dv_serialize_data
mov r17=cr.isr
mov r23=r31
mov r22=b0
st8 [r17] = r27
;;
itc.d r25
+ dv_serialize_data
mov r17=cr.isr
mov r23=r31
mov r22=b0
// this is a temporary hack until real console input is implemented
extern void domain_pend_keyboard_interrupt(int irq);
-irqreturn_t guest_forward_keyboard_input(int irq, void *nada, struct pt_regs *regs)
+void guest_forward_keyboard_input(int irq, void *nada, struct pt_regs *regs)
{
domain_pend_keyboard_interrupt(irq);
- return 0;
}
void serial_input_init(void)
}
static fpswa_ret_t
-fp_emulate (int fp_fault, void *bundle, long *ipsr, long *fpsr, long *isr, long *pr, long *ifs,
- struct pt_regs *regs)
+fp_emulate (int fp_fault, void *bundle, unsigned long *ipsr,
+ unsigned long *fpsr, unsigned long *isr, unsigned long *pr,
+ unsigned long *ifs, struct pt_regs *regs)
{
fp_state_t fp_state;
fpswa_ret_t ret;
* unsigned long *pifs,
* void *fp_state);
*/
- ret = (*fpswa_interface->fpswa)((unsigned long) fp_fault, bundle,
- (unsigned long *) ipsr, (unsigned long *) fpsr,
- (unsigned long *) isr, (unsigned long *) pr,
- (unsigned long *) ifs, &fp_state);
+ ret = (*fpswa_interface->fpswa)(fp_fault, bundle,
+ ipsr, fpsr, isr, pr, ifs, &fp_state);
return ret;
}
#include <asm/vhpt.h>
#include <asm/tlbflush.h>
#include <xen/event.h>
+#include <asm/vmx_phy_mode.h>
/* FIXME: where these declarations should be there ? */
extern void getreg(unsigned long regnum, unsigned long *val, int *nat, struct pt_regs *regs);
return;
}
-irqreturn_t
+void
xen_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
{
unsigned long new_itm, old_itc;
new_itm = local_cpu_data->itm_next;
if (!VMX_DOMAIN(current) && !time_after(ia64_get_itc(), new_itm))
- return IRQ_HANDLED;
+ return;
while (1) {
new_itm += local_cpu_data->itm_delta;
/* double check, in case we got hit by a (slow) PMI: */
} while (time_after_eq(ia64_get_itc(), new_itm));
raise_softirq(TIMER_SOFTIRQ);
-
- return IRQ_HANDLED;
}
static struct irqaction xen_timer_irqaction = {
* IRQ_HANDLED means that we did have a valid interrupt and handled it.
* IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled)
*/
+#ifdef XEN
+typedef void irqreturn_t;
+#else
typedef int irqreturn_t;
+#endif
#define IRQ_NONE (0)
#define IRQ_HANDLED (1)